package ynu.lcy.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import ynu.lcy.elememicroservicecommon.entity.LogicEntity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

/**
 * 中间实体，表示商家类型
 * */
@Entity
@Setter
@Getter
@NoArgsConstructor
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"})
public class BusinessOrderType extends LogicEntity {

    @ManyToOne(fetch = FetchType.EAGER)
    @JsonIgnoreProperties(value = {"businessOrderTypes"})
    private Business business;

    @ManyToOne(fetch = FetchType.EAGER)
    @JsonIgnoreProperties(value = {"businessOrderTypes"})
    private OrderType orderType;

}
